package ru.evga.gwt.lib.common.client.request.jsonrpc;

import com.google.gwt.core.client.JavaScriptObject;


public class JsonRpcRequest<T extends JavaScriptObject>
    extends JavaScriptObject
{
    protected JsonRpcRequest()
    {
    }

    // JSNI methods 
    static public final native <T extends JavaScriptObject> JsonRpcRequest<T> createEmptyParams() /*-{
        return eval("({\"jsonrpc\":\"2.0\"})");
    }-*/;

    public final native int getId() /*-{
        return this.id;
    }-*/;

    public final native void setId(int id) /*-{
        this.id = id;
    }-*/;

    public final native void setVersion(String version) /*-{
        return this.jsonrpc = String ;
    }-*/;

    public final native void setMethod(String method) /*-{
        this.method = method;
    }-*/;

    public final native void setParams(T params) /*-{
        this.params = params;
    }-*/;
}
